/* 
 * File:   line_edit.cpp
 * Author: jolo
 * 
 * Created on 5. Oktober 2011, 18:56
 */

#include "line_edit.hpp"

namespace widgets
{

    line_edit::line_edit(QWidget* p)
    : QLineEdit(p)
    {
        connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(on_text_change(const QString&)));
    }

    line_edit::~line_edit()
    {
    }
    
    void line_edit::set(const string& v) {
        setText(v.c_str());
    }
    
    void line_edit::on_text_change(const QString& s) {
        emit changed(s.toStdString());
    }
}